﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="QL_Thanhvien.aspx.cs" Inherits="DOAN.Admin.QL_Thanhvien" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="content-right">
        <div class="title_right">
            <p class="fs24 cl2 fi font_time">
                <img src="../Imagine/icon_right_title.png" alt="" />Quản lý thành viên</p>
        </div>
        <div class="register mart10">
            <span class="cl4">
                <asp:Label ID="lblLoi" runat="server" Text=""></asp:Label></span></div>
        <div class="register mart10">
            <div class="label">
                <asp:ImageButton ID="img_refesh" runat="server" ImageUrl="~/Imagine/icon_refresh.png"
                    OnClick="imgRe_Click" Style="height: 22px" />
                Refresh
            </div>
            <asp:ImageButton ID="img_btXemds" runat="server" ImageUrl="~/Imagine/true.PNG" OnClick="imgXemDS_Click"
                Style="height: 22px" />
            Danh sách sinh viên
            <asp:ImageButton ID="img_Timkiem" runat="server" ImageUrl="~/Imagine/true.PNG" OnClick="imgTimkiem_Click"
                Style="height: 22px" />
            Tìm kiếm
            <asp:ImageButton ID="them" runat="server" ImageUrl="~/Imagine/icon_add.png" OnClick="imgThem_Click"
                Style="height: 22px; width: 22px; margin-left: 10px" />
            Thêm sinh viên
            <asp:ImageButton ID="ImageButton12" runat="server" ImageUrl="~/Imagine/icon_add.png"
                OnClick="imgImport_Click" Style="height: 22px; width: 22px; margin-left: 10px" />
            Import file excel
        </div>
        <asp:Panel ID="pnDSSV" runat="server" Visible="true">
            <div class="register mart22">
                <div class="text_box2">
                    <asp:RadioButtonList runat="server" ID="rd_tv" Width="300px" ForeColor="#000" RepeatDirection="Horizontal"
                        AutoPostBack="True" OnSelectedIndexChanged="rd_tv_SelectedIndexChanged">
                        <asp:ListItem Text="Theo họ tên" Value="0"></asp:ListItem>
                        <asp:ListItem Text="Theo mã sinh vien " Value="1"></asp:ListItem>
                        <asp:ListItem Text="Theo Lop" Value="2"></asp:ListItem>
                    </asp:RadioButtonList>
                </div>
            </div>
        </asp:Panel>
        <asp:Panel ID="pnTimkiem" Visible="false" runat="server">
            <div class="register mart22">
                <div class="label">
                    <asp:Label ID="tkLop" runat="server" Text="Chọn lớp"></asp:Label>
                </div>
                <div class="text_box">
                    <asp:DropDownList ID="drLop" runat="server" Width="167px">
                    </asp:DropDownList>
                </div>
                <div class="label">
                    <asp:Button ID="btchon" runat="server" Text="Chọn" OnClick="btchon_Click" />
                </div>
            </div>
        </asp:Panel>
        <asp:Panel ID="pnTK" Visible="false" runat="server">
            <div class="label">
                <asp:Label ID="Label3" runat="server"  Text="Tu Khoa"></asp:Label>
            </div>
            <div class="text_box">
                <asp:TextBox ID="txtTimkiem" runat="server" Width="182px"></asp:TextBox>
            </div>
            <div class="label">
                <asp:ImageButton ID="imgtk" runat="server" ImageUrl="~/Imagine/input_search.png"
                    OnClick="imgtk_Click" Style="height: 22px" />
            </div>
    </asp:Panel>
    <div class="register mart22">
        <asp:Panel ID="pnImport" runat="server" Visible="false" Height="150px">
            <asp:Label ID="Label12" runat="server" Text="Chú ý: File import phải là file excel(.xls). Dữ liệu load từ dòng 2, dòng 1 được coi là tiêu đề( không import ). Chú ý các trường phải đúng thứ tự!"
                ForeColor="Red" Width="679px" Style="position: static"></asp:Label>
            <table style="position: relative; left: 20px; top: 20px;">
                <tr>
                    <td colspan="2">
                        <asp:Label ID="lblError" runat="server" Visible="False" ForeColor="Red" Width="231px"
                            Style="position: static"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        Chọn file
                    </td>
                    <td style="width: 100px">
                        <asp:FileUpload ID="FileUpload1" runat="server" />
                    </td>
                </tr>
                <tr align="center">
                    <td colspan="2">
                        <asp:Button ID="btnImport" runat="server" Text="Import" OnClick="btnImport_Click" />
                        <asp:Button ID="btnCancel" runat="server" Text="Cancel" />
                    </td>
                </tr>
            </table>
            <br />
            <asp:Label ID="lblMessage" runat="server" Text="" ForeColor="green"></asp:Label>
        </asp:Panel>
        <br />
        <asp:GridView runat="server" ID="griThanhvien" AutoGenerateColumns="False" EmptyDataText="Không có dữ liệu !"
            OnRowCommand="griThanhvien_RowCommand" CellPadding="4" GridLines="None" Width="679px"
            ForeColor="#333333" AllowPaging="True" OnPageIndexChanging="griThanhvien_PageIndexChanging"
            PageSize="10">
            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <Columns>
                <asp:TemplateField HeaderText="Tên đăng nhập">
                    <ItemTemplate>
                        <asp:Label Enabled="false" runat="server" ID="lblTentk" Text='<%#DataBinder.Eval(Container.DataItem,"Tentaikhoan") %>'>
                        </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Họ tên">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblht" Text='<%#DataBinder.Eval(Container.DataItem,"Hovaten") %>'>
                        </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Mật khẩu">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblmk" Text='<%#DataBinder.Eval(Container.DataItem,"Matkhau") %>'>
                        </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Email">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblEmail" Text='<%#DataBinder.Eval(Container.DataItem,"Email") %>'>
                        </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Ngày sinh">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblns" Text='<%#DataBinder.Eval(Container.DataItem,"Ngaysinh") %>'>
                        </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Giới tính">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblgt" Text='<%#DataBinder.Eval(Container.DataItem,"Gioitinh") %>'>
                        </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Lớp">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblLop" Text='<%#DataBinder.Eval(Container.DataItem,"Lop") %>'>
                        </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Sdt">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblsdt" Text='<%#DataBinder.Eval(Container.DataItem,"Sodienthoai") %>'>
                        </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Sửa">
                    <ItemTemplate>
                        <asp:ImageButton runat="server" ID="img_sua" CommandName="sua" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"Tentaikhoan") %>'
                            ImageUrl="~/icon/edit_profile.png" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Xóa">
                    <ItemTemplate>
                        <asp:ImageButton runat="server" ID="img_xoa" CommandName="xoa" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"Tentaikhoan") %>'
                            ImageUrl="~/icon/delete_user.png" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#990000" ForeColor="White" Font-Bold="True" />
            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
    </div>
    <asp:Panel ID="pnThanhvien" runat="server" Visible="false">
        <div class="register mart22">
            <div class="label">
                <asp:Label ID="lblMa" runat="server" Text="Tên đăng nhập"></asp:Label>
            </div>
            <div class="text_box">
                <asp:Label ID="lblmatv" runat="server" Text=""></asp:Label>
            </div>
        </div>
        <div class="register mart22">
            <div class="label">
                <asp:Label ID="lblTentaikhoan" runat="server" Text="Họ và tên"></asp:Label>
            </div>
            <div class="text_box">
                <asp:TextBox ID="txtTentaikhoan" runat="server" Width="209px"></asp:TextBox></div>
        </div>
        <div class="register mart22">
            <div class="label">
                <asp:Label ID="LblHovaten" runat="server" Text="Mật khẩu"></asp:Label>
            </div>
            <div class="text_box">
                <asp:TextBox ID="TxtHoten" runat="server" Width="209px"></asp:TextBox></div>
        </div>
        <div class="register mart22">
            <div class="label">
                <asp:Label ID="Label2" runat="server" Text="Email"></asp:Label>
            </div>
            <div class="text_box">
                <asp:TextBox ID="txtMk" runat="server" Width="209px"></asp:TextBox></div>
        </div>
        <div class="register mart22">
            <div class="label">
                <asp:Label ID="Label1" runat="server" Text="Ngày sinh"></asp:Label>
            </div>
            <div class="text_box2">
                <asp:DropDownList ID="drNgaysinh" runat="server">
                    <asp:ListItem Value="d">Ngày</asp:ListItem>
                </asp:DropDownList>
                -
                <asp:DropDownList ID="drThangsinh" runat="server">
                    <asp:ListItem Value="m">Tháng</asp:ListItem>
                </asp:DropDownList>
                -
                <asp:DropDownList ID="drNamsinh" runat="server">
                    <asp:ListItem Value="y">Năm</asp:ListItem>
                </asp:DropDownList>
            </div>
        </div>
        <div class="register mart22">
            <div class="label">
                <asp:Label ID="LblGioitinh" runat="server" Text="Giới tính"></asp:Label>
            </div>
            <div class="text_box">
                <asp:RadioButton ID="rdnam" runat="server" Text="Nam" GroupName="rdGT" />
                <asp:RadioButton ID="rdNu" runat="server" Text="Nữ" GroupName="rdGT" />
            </div>
        </div>
        <div class="register mart22">
            <div class="label">
                <asp:Label ID="Label4" runat="server" Text="Lớp"></asp:Label>
            </div>
            <div class="text_box">
                <asp:TextBox ID="txtsdt" runat="server" Width="209px"></asp:TextBox></div>
        </div>
        <div class="register mart22">
            <div class="label">
                <asp:Label ID="LblLop" runat="server" Text="Số điện thoại"></asp:Label>
            </div>
            <div class="text_box">
                <asp:TextBox ID="TxtLop" runat="server" Width="209px"></asp:TextBox></div>
        </div>
        <div class="register mart22">
            <asp:Button ID="btDongy" runat="server" Text="Đồng ý" OnClick="btDongy_Click" Style="height: 26px" />
            <asp:Button ID="btLamlai" runat="server" Text="Hủy " OnClick="btLamlai_Click" Width="61px" />
        </div>
    </asp:Panel>
    <div class="register mart22">
        <asp:Panel ID="pnThemsv" runat="server" Visible="false">
            <div class="register mart22">
                <div class="label">
                    <asp:Label ID="Label5" runat="server" Text="Tên đăng nhập"></asp:Label></div>
                <div class="text_box">
                    <asp:TextBox ID="txttentk2" runat="server" Width="176px"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Chưa nhập tên đăng nhập"
                        ValidationGroup="kiemtra" ControlToValidate="txttentk2" Display="Dynamic"></asp:RequiredFieldValidator>
                </div>
            </div>
            <div class="register mart22">
                <div class="label">
                    <asp:Label ID="Label6" runat="server" Text="Họ và tên"></asp:Label></div>
                <div class="text_box">
                    <asp:TextBox ID="txthoten2" runat="server" Width="176px"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Chưa nhập họ và tên"
                        ValidationGroup="kiemtra" ControlToValidate="txthoten2" Display="Dynamic"></asp:RequiredFieldValidator>
                </div>
            </div>
            <div class="register mart22">
                <div class="label">
                    <asp:Label ID="Label7" runat="server" Text="Mật khẩu"></asp:Label></div>
                <div class="text_box">
                    <asp:TextBox ID="txtmk2" runat="server" Width="176px"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Chưa nhập mật khẩu"
                        ValidationGroup="kiemtra" ControlToValidate="txtmk2" Display="Dynamic"></asp:RequiredFieldValidator>
                </div>
            </div>
            <div class="register mart22">
                <div class="label">
                    <asp:Label ID="Label8" runat="server" Text="Email"></asp:Label></div>
                <div class="text_box">
                    <asp:TextBox ID="txtemail2" runat="server" Width="176px"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="Chưa nhập email"
                        ValidationGroup="kiemtra" ControlToValidate="txtemail2" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtemail2"
                        ErrorMessage="Định dạng emai không đúng" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                </div>
            </div>
            <div class="register mart22">
                <div class="label">
                    <asp:Label ID="Label110" runat="server" Text="Ngày sinh"></asp:Label>
                </div>
                <div class="text_box2">
                    <asp:DropDownList ID="drNgaysinh2" runat="server">
                        <asp:ListItem Value="d">Ngày</asp:ListItem>
                    </asp:DropDownList>
                    -
                    <asp:DropDownList ID="drThangsinh2" runat="server">
                        <asp:ListItem Value="m">Tháng</asp:ListItem>
                    </asp:DropDownList>
                    -
                    <asp:DropDownList ID="drNamsinh2" runat="server">
                        <asp:ListItem Value="y">Năm</asp:ListItem>
                    </asp:DropDownList>
                </div>
            </div>
            <div class="register mart22">
                <div class="label">
                    <asp:Label ID="Label11" runat="server" Text="Giới tính"></asp:Label>
                </div>
                <div class="text_box">
                    <asp:RadioButtonList ID="rdGioitinh2" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="1" Selected="True">Nam</asp:ListItem>
                        <asp:ListItem Value="2" Selected="False"> Nữ</asp:ListItem>
                    </asp:RadioButtonList>
                </div>
            </div>
            <div class="register mart22">
                <div class="label">
                    <asp:Label ID="Label9" runat="server" Text="Lớp"></asp:Label></div>
                <div class="text_box">
                    <asp:TextBox ID="txtlop2" runat="server" Width="176px"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="Chưa nhập lớp"
                        ValidationGroup="kiemtra" ControlToValidate="txtlop2" Display="Dynamic"></asp:RequiredFieldValidator>
                </div>
            </div>
            <div class="register mart22">
                <div class="label">
                    <asp:Label ID="Label10" runat="server" Text="Số điện thoại"></asp:Label></div>
                <div class="text_box">
                    <asp:TextBox ID="txtsdt2" runat="server" Width="176px"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Chưa nhập số điện thoại"
                        ValidationGroup="kiemtra" ControlToValidate="txtsdt2" Display="Dynamic"></asp:RequiredFieldValidator>
                </div>
            </div>
            <div class="register mart22">
                <asp:Button ID="btLuu_them" runat="server" Text="Thêm" OnClick="btLuu_them_Click"
                    ValidationGroup="kiemtra" />
                <asp:Button ID="btHuy_luu" runat="server" Text="Hủy" OnClick="btHuy_luu_Click" />
            </div>
        </asp:Panel>
    </div>
    </div>
</asp:Content>
